home *** CD-ROM | disk | FTP | other *** search
- Path: classic.iinet.com.au!news
- From: ng@mitswa.com.au (John A Ng)
- Newsgroups: comp.lang.c++
- Subject: Re: Getting time and date?
- Date: Mon, 22 Jan 1996 09:38:45 GMT
- Organization: MITS (WA)
- Message-ID: <4e0i22$rhn@classic.iinet.com.au>
- References: <4d4bcb$3ti@hermes.louisville.edu>
- NNTP-Posting-Host: grunge184.nv.iinet.net.au
- X-Newsreader: Forte Free Agent 1.0.82
-
- bbboon01@homer.louisville.edu (Billy Boone) wrote:
-
- >I was wondering if there were any functions for getting the current time and
- >date. I'm using Visual C++ 1.5.
-
- >Billy
-
-
- This is Borland C++ (a better C compiler) example:
-
- #include <dos.h>
- #include <stdio.h>
-
- int main(void)
- {
- struct dosdate_t d;
- _dos_getdate(&d);
- printf("The current year is: %d\n", d.year);
- printf("The current day is: %d\n", d.day);
- printf("The current month is: %d\n", d.month);
- return 0;
- }
-
- There should be a similar thing in Visual C++.
- Regards,
-
- John Ng
- ng@mitswa.com.au
- Western Australia
-
-